package com.gxl.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gxl.service.UsersService;
import com.gxl.service.impl.UsersServiceImpl;

@WebServlet("/show")
public class ShowServlet extends HttpServlet{
	private UsersService us = new UsersServiceImpl();
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
		req.setAttribute("list", us.selAll());
		req.getRequestDispatcher("index.jsp").forward(req, res);
	}
	
}
